<template>
	<div id="product">
		<div class="home_div_search">
			<span class="pro_icon" @click="backHome()">
				〈</span>
					<span>
						<input class="searchBox" type="text" name="search" placeholder="山姆会员商店优惠商品">
					</span>
		</div>

		<div class="product_div_bottom" v-for="(item,index) in dataList" v-if="index === 0">
			<div class="home_div_bottom_bottom">
				<img :src="item.imgs" />
				<div class="home_bottom_text">
					<div class="home_bottom_text_first">{{item.shopName}}</div>
					<div class="home_bottom_text_second">
						<span>{{item.sales}}</span>
						<span>{{item.courier}}</span>
						<span>{{item.freight}}</span>
					</div>
					<div class="home_bottom_text_third">{{item.text}}</div>
				</div>
			</div>
		</div>

		<div>
			<div class="pro_div_left_between">
				<div class="pro_detail_height">
					<div class="pro_div_left_colunm">
						<span v-for="item in leftListL">{{item}}</span>
					</div>
				</div>


				<div class="pro_detail_height_right">
					<div class="pro_div_detail_bottom" v-for="item in dataList">
						<img :src="item.imgs" />
						<div class="pro_bottom_text">
							<div class="pro_div_detail_bottom_text_first">{{item.shopName}}</div>
							<div class="pro_div_detail_bottom_text_second">
								<span>{{item.sales}}</span>
							</div>
							<div class="pro_div_detail_bottom_text_third">
								<span class="first_text">
									￥{{item.price}}
								</span>
								<p class="second_text">￥{{item.price}}</p>
								<span class="thid_text">
									<span><img class="icon_jia" :src="item.img1" @click="jian()"></span>
									<input type="text" v-model="num" />
									<img class="icon_jia" :src="item.img" @click="jia()">
								</span>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>


		<div>
			<div class="footer_guide">
				<div class="guide_item">
					<div class="pro_bottom">
						<span class="item_icon">
							<img src="../assets/shangjia/购物车.png" />
						</span>
					</div>
					<div class="pro_bottom_span">
						<span>总计：</span>
						<span class="pro_bottom_span_text">￥128</span>
					</div>
					<div class="pro_bottom_span_end" @click="toShade()">
						<span>去结算</span>
					</div>
				</div>
			</div>
		</div>
	</div>
	
</template>

<script>
	export default {
		data() {
			return {
				num: 0,
				//左边栏
				leftListL: ['全部商品', '秒杀', '新鲜水果', '休闲食品', '时令蔬菜', '肉蛋家禽'],

				//主要商品信息
				dataList: [{
					shopName: '沃尔玛',
					sales: '月售1万+',
					price: 33.6,
					img: require('../assets/shangjia/加.png'),
					img1: require('../assets/shangjia/减.png'),
					imgs: require('../assets/orders/icon_order.png'),
					courier: '起送￥0',
					freight: '基础运费￥5',
					text: 'VIP尊享满89元减4元运费券（每月3张）'
				}, {
					shopName: '番茄250g/份',
					sales: '月售1万+',
					price: 33.6,
					img: require('../assets/shangjia/加.png'),
					img1: require('../assets/shangjia/减.png'),
					imgs: require('../assets/orders/icon_order.png')
				}, {
					shopName: '番茄250g/份',
					sales: '月售1万+',
					price: 33.6,
					img: require('../assets/shangjia/加.png'),
					img1: require('../assets/shangjia/减.png'),
					imgs: require('../assets/orders/icon_order.png')
				}, {
					shopName: '番茄250g/份',
					sales: '月售1万+',
					price: 33.6,
					img: require('../assets/shangjia/加.png'),
					img1: require('../assets/shangjia/减.png'),
					imgs: require('../assets/orders/icon_order.png')
				}]
			}
		},
		methods: {
			backHome() {
				this.$router.push('/home')
			},
			toShade() {
				this.$router.push('/shopsdetails')
			},
			jian() {
				this.num--
			},
			jia() {
				this.num++
			}
		}
	}
</script>

<style scoped>


	input {
		border: 0;
		width: 10px;
		margin-left: 25px;
	}

	.pro_detail_height_right {
		width: 90%;
	}

	#product {
		height: 100%;
		position: fixed;
		width: 100%;
	}

	.home_div_search {
		margin-left: 18.2px;
	}

	.home_div_search .searchBox {
		background: #F5F5F5;
		border-radius: 16px;
		height: 32px;
		width: 80%;
		margin-left: 16.2px;
		margin-right: 18px;
		text-align: left;
		padding-left: 12.1px;
		border: 0;
		margin-top: 16px;
	}

	.home_div_search .pro_icon {
		height: 21.2px;
	}

	.product_div_bottom {
		height: 106px;
		margin-top: 24px;
	}

	.home_div_bottom_bottom {
		margin-top: 14px;
		text-align: left;
		margin-left: 18px;
		display: flex;
		justify-content: start;
	}

	.home_div_bottom_bottom img {
		height: 56px;
		width: 56px;
	}

	.home_div_bottom_bottom .home_bottom_text {
		margin-left: 16px;
	}

	.home_div_bottom_bottom .home_bottom_text .home_bottom_text_first {
		font-family: PingFangSC-Regular;
		font-size: 16px;
		color: #333333;
	}

	.home_div_bottom_bottom .home_bottom_text .home_bottom_text_second {
		font-family: PingFangSC-Regular;
		font-size: 13px;
		color: #333333;
		display: flex;
		justify-content: space-between;
		margin-top: 8px;
	}

	.home_div_bottom_bottom .home_bottom_text .home_bottom_text_third {
		font-family: PingFangSC-Regular;
		font-size: 13px;
		color: #E93B3B;
		margin-top: 8px;
		border-bottom: 1px solid #F1F1F1;
		padding-bottom: 12px;
	}

	.pro_div_left_between {
		display: flex;
		justify-content: flex-start;
		height: 100%;
	}


	.pro_div_left_between .pro_div_left_colunm {
		display: flex;
		flex-direction: column;
		align-items: center;
		height: 100%;
		background: #F5F5F5;
		border-radius: 2px;
		width: 86px;
	}

	.pro_div_left_between .pro_div_left_colunm span {
		margin-left: 10px;
		margin-right: 16px;
		margin-top: 12px;
		height: 40px;
		font-family: PingFangSC-Regular;
		font-size: 14px;
		color: #333333;
		line-height: 16px;
	}

	.pro_div_detail_bottom {
		display: flex;
		justify-content: flex-start;
		margin-bottom: 12px;
		height: 92px;
		margin-left: 16px;
		border-bottom: 1px solid #F1F1F1;
		width: 100%;
	}

	.pro_div_detail_bottom>img {
		width: 68px;
		height: 68px;
	}

	.pro_bottom_text {
		margin-left: 16px;
		text-align: left;
		width: 100%;
	}

	.pro_bottom_text .pro_div_detail_bottom_text_first {
		font-family: PingFangSC-Medium;
		font-size: 14px;
		color: #333333;
	}

	.pro_bottom_text .pro_div_detail_bottom_text_second {
		margin-top: 6px;
		font-family: PingFangSC-Regular;
		font-size: 12px;
		color: #333333;
		line-height: 16px;
	}

	.pro_bottom_text .pro_div_detail_bottom_text_third {
		margin-top: 6px;
		display: flex;
		justify-content: space-between;

	}

	.pro_bottom_text .pro_div_detail_bottom_text_third .icon_jia {
		width: 19.5px;
		height: 19.4px;
		text-align: right;
		padding-left: 10px;
		padding-right: 10px;
	}

	.pro_div_detail_bottom_text_third .first_text {
		font-family: PingFangSC-Semibold;
		font-size: 14px;
		color: #E93B3B;
		line-height: 20px;
		margin-right: 12px;
	}

	.pro_div_detail_bottom_text_third .second_text {
		font-family: PingFangSC-Regular;
		font-size: 10px;
		color: #999999;
		line-height: 20px;
	}

	.pro_div_detail_bottom_text_third .thid_text {
		display: flex;
		justify-content: space-between;
		margin-left: 16px;
		margin-right: 205px;
	}

	.footer_guide {
		border-top: 1px soild #e4e4e4;
		position: fixed;
		z-index: 100;
		left: 0;
		right: 0;
		bottom: 1px;
		background-color: #fff;
		width: 100%;
		height: 50px;
		display: flex;
	}

	.guide_item {
		display: flex;
		flex: 1;
		text-align: center;
		justify-content: flex-start;
		align-items: center;
		margin: 5px;
		color: #999999;
	}

	.item_icon img {
		width: 28px;
		height: 26px;
		margin-top: 11px;
		margin-left: 24px;
		margin-bottom: 12px;
	}

	.pro_bottom_span {
		margin-right: 180px;
		margin-left: 32px;
		margin-top: 16px;
		margin-bottom: 16px;
	}

	.pro_bottom_span_end {
		background: #4FB0F9;
		padding: 14px 28px 14px 28px;
		font-family: PingFangSC-Medium;
		font-size: 14px;
		color: #FFFFFF;
		position: absolute;
		right: 0;
		bottom: 0;
	}

	.pro_bottom_span_text {
		font-family: PingFangSC-Medium;
		font-size: 18px;
		color: #E93B3B;
	}

	.border_right {
		text-align: right;
	}

	.thid_text span:nth-child(1) {
		height: 17.2px;
		width: 17.2px;
	}

	.thid_text span:nth-child(2) {
		height: 17.2px;
		width: 17.2px;
		margin-left: 20px;
		margin-right: -4px;
	}
	.footer_guide .guide_item{
		margin-bottom: 50px;
	}
</style>
